<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The SeasLog class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.seaslog-get-version.html">« seaslog_get_version</a></li>
      <li style="float: right;"><a href="seaslog.alert.html">SeasLog::alert »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.seaslog.html">SeasLog</a></li>
    <li>The SeasLog class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.seaslog" class="reference">

 <h1 class="title">The SeasLog class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL seaslog &gt;=1.0.0)</p>


  <div class="section" id="seaslog.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="seaslog.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">SeasLog</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.alert.html" class="methodname">alert</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.analyzercount.html" class="methodname">analyzerCount</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$level</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$log_path</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$key_word</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.analyzerdetail.html" class="methodname">analyzerDetail</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$level</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$log_path</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key_word</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$start</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$limit</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$order</code><span class="initializer"> = ?</span></span><br>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.closeloggerstream.html" class="methodname">closeLoggerStream</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$model</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.critical.html" class="methodname">critical</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.debug.html" class="methodname">debug</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="seaslog.destruct.html" class="methodname">__destruct</a></span>()</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.emergency.html" class="methodname">emergency</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.error.html" class="methodname">error</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.flushbuffer.html" class="methodname">flushBuffer</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getbasepath.html" class="methodname">Seaslog::getBasePath</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getbuffer.html" class="methodname">getBuffer</a></span>(): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getbufferenabled.html" class="methodname">getBufferEnabled</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getdatetimeformat.html" class="methodname">getDatetimeFormat</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getlastlogger.html" class="methodname">getLastLogger</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getrequestid.html" class="methodname">getRequestID</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.getrequestvariable.html" class="methodname">getRequestVariable</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$key</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.info.html" class="methodname">info</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.log.html" class="methodname">log</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$level</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.notice.html" class="methodname">notice</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.setbasepath.html" class="methodname">setBasePath</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$base_path</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.setdatetimeformat.html" class="methodname">setDatetimeFormat</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$format</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.setlogger.html" class="methodname">setLogger</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.setrequestid.html" class="methodname">setRequestID</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$request_id</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.setrequestvariable.html" class="methodname">setRequestVariable</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$key</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="seaslog.warning.html" class="methodname">warning</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$content</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$logger</code><span class="initializer"> = ?</span></span>): <span class="type">bool</span></div>

   }</div>


  </div>

 </div>

 




































































































































































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="seaslog.alert.html">SeasLog::alert</a> — 记录 alert 日志</li><li><a href="seaslog.analyzercount.html">SeasLog::analyzerCount</a> — Get log count by level, log_path and key_word</li><li><a href="seaslog.analyzerdetail.html">SeasLog::analyzerDetail</a> — Get log detail by level, log_path, key_word, start, limit, order</li><li><a href="seaslog.closeloggerstream.html">SeasLog::closeLoggerStream</a> — Manually release stream flow from logger</li><li><a href="seaslog.construct.html">SeasLog::__construct</a> — Description</li><li><a href="seaslog.critical.html">SeasLog::critical</a> — 记录 critical 日志</li><li><a href="seaslog.debug.html">SeasLog::debug</a> — 记录 debug 日志</li><li><a href="seaslog.destruct.html">SeasLog::__destruct</a> — Description</li><li><a href="seaslog.emergency.html">SeasLog::emergency</a> — 记录 emergency 日志</li><li><a href="seaslog.error.html">SeasLog::error</a> — 记录 error 日志</li><li><a href="seaslog.flushbuffer.html">SeasLog::flushBuffer</a> — 将日志缓存刷新到介质中，文件介质，或者发送到远端的 TCP/UDP 服务地址。</li><li><a href="seaslog.getbasepath.html">SeasLog::getBasePath</a> — 获得 SeasLog 根目录</li><li><a href="seaslog.getbuffer.html">SeasLog::getBuffer</a> — 获取内存中的日志缓存数组</li><li><a href="seaslog.getbufferenabled.html">SeasLog::getBufferEnabled</a> — Determin if buffer enabled</li><li><a href="seaslog.getdatetimeformat.html">SeasLog::getDatetimeFormat</a> — 获取 SeasLog 日期格式</li><li><a href="seaslog.getlastlogger.html">SeasLog::getLastLogger</a> — 获得 SeasLog 最近的一次 Logger 名称</li><li><a href="seaslog.getrequestid.html">SeasLog::getRequestID</a> — 获得当前 SeasLog 中用于区分请求的 request_id</li><li><a href="seaslog.getrequestvariable.html">SeasLog::getRequestVariable</a> — Get SeasLog request variable</li><li><a href="seaslog.info.html">SeasLog::info</a> — Record info log information</li><li><a href="seaslog.log.html">SeasLog::log</a> — 公共的日志记录函数</li><li><a href="seaslog.notice.html">SeasLog::notice</a> — 记录 notice 日志</li><li><a href="seaslog.setbasepath.html">SeasLog::setBasePath</a> — 设置 SeasLog 根目录</li><li><a href="seaslog.setdatetimeformat.html">SeasLog::setDatetimeFormat</a> — 设置 SeasLog 日期格式</li><li><a href="seaslog.setlogger.html">SeasLog::setLogger</a> — 设置 SeasLog 的 Logger 名</li><li><a href="seaslog.setrequestid.html">SeasLog::setRequestID</a> — 设置可以由 SeasLog 用于区分请求的 request_id</li><li><a href="seaslog.setrequestvariable.html">SeasLog::setRequestVariable</a> — Manually set SeasLog request variable</li><li><a href="seaslog.warning.html">SeasLog::warning</a> — Record warning log information</li></ul>
</div>
</div></div></body></html>